Deluxe Pong by Neil Roy

This is the result of about 6 hours work. I spent lots of time trying to get this to work as an Allegro 5 project, but allegro 5 has so many dependancies, most of which I have to compile myself, and they have dependancies etc... etc... a HUGE headache.  I ended up trashing that idea and switched to Allegro 4.4 and it all came together real smoothly.  I like how Allegro 5 looks, but it needs to be worked on a lot more in my opinion, or only the most seasoned programmers will ever be able to use it.

Anyhow, there isn't much "Deluxe" about this, it's more of a joke for a title (with my Deluxe Pacman).  Someone challenged me to make a pong game, so I did. :D

The keys are simple, and there isn't any score displayed yet.

A - Z  move the left paddle.

keypad 6 and 3 move the right paddle.

I didn't implement the mouse because it would be unfair that only one player would get to use the mouse and would give them an advantage.  So I picked keys that were as far apart as I could so two people could play comfortably.

If the ball goes off screen, you press SPACE to serve it from the paddle opposite of where it went off screen (the ball will start at the other paddle, so that player has a little control over where it gets served from).  You end the game by either pressing ESC or clicking the close button on the window.

The source code is provided as it is so far with a Code::Blocks project file to load it into Code::Blocks.

Enjoy. :)

Update: I just cleaned up the code some more and placed the drawing code in one function and the logic code (keyboard input, object movement) in another function and made a separate function for shutting down (clearing allocated memory).  I also was able to fix the game timing so that it should run at about the same speed on any system.